import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;


public class ServerObject implements Serializable, ServerObject_itf {
	
	private int lock;
	private int id;
	private Object obj;
	//private String name;
	private int NL=0;
	private int RL=1;
	private int WL=2;
	
	private Set<Client_itf> clients = new HashSet<Client_itf>();
	
	public ServerObject(int i, Object o){
		this.id=i;
		this.obj=o;
		this.lock=NL;
	}
	
	public Object lock_read(Client_itf client) {
		if(this.lock==NL){
			this.lock=RL;
		}
		//faire des switchs
		//appel reduce_lock;
		return null;
	}
	public Object lock_write(Client_itf client) {
		return null;
	}
}
